<template>
  <div class="not-found-page">
    <div class="container">
      <div class="error-content">
        <div class="error-image">
          <img src="@/assets/images/er.gif" alt="404" />
        </div>
        <h1>404</h1>
        <h2>页面不存在</h2>
        <p>抱歉，您访问的页面不存在或已被删除。</p>
        <div class="error-actions">
          <el-button type="primary" @click="goHome">
            <i class="el-icon-house"></i>
            返回首页
          </el-button>
          <el-button @click="goBack">
            <i class="el-icon-back"></i>
            返回上页
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NotFound',
  methods: {
    goHome() {
      this.$router.push('/')
    },
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style scoped>
.not-found-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.container {
  max-width: 600px;
  padding: 40px 20px;
}

.error-content {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error-image {
  margin-bottom: 20px;
}

.error-image img {
  width: 200px;
  height: auto;
}

h1 {
  font-size: 72px;
  color: #ff4e00;
  margin: 20px 0 10px 0;
  font-weight: bold;
}

h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 15px;
}

p {
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

@media (max-width: 768px) {
  .error-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .error-actions .el-button {
    width: 200px;
  }
}
</style>